<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>CUTLASS: host_tensor.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="cutlass-logo-small.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CUTLASS
   </div>
   <div id="projectbrief">CUDA Templates for Linear Algebra Subroutines and Solvers</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_4eeb864c4eec08c7d6b9d3b0352cfdde.html">tools</a></li><li class="navelem"><a class="el" href="dir_88de82f9e8d739a2f42f92d95f0d7933.html">util</a></li><li class="navelem"><a class="el" href="dir_7e9e609009df72bf6226de354e72c328.html">include</a></li><li class="navelem"><a class="el" href="dir_ade2f6ff57439d30f4164e14e54bcf30.html">cutlass</a></li><li class="navelem"><a class="el" href="dir_ff60863f958a43c892071bb1f8a4c81a.html">util</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">host_tensor.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="host__tensor_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/***************************************************************************************************</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * Copyright (c) 2017-2019, NVIDIA CORPORATION.  All rights reserved.</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> * Redistribution and use in source and binary forms, with or without modification, are permitted</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * provided that the following conditions are met:</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *     * Redistributions of source code must retain the above copyright notice, this list of</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *       conditions and the following disclaimer.</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *     * Redistributions in binary form must reproduce the above copyright notice, this list of</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *       conditions and the following disclaimer in the documentation and/or other materials</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *       provided with the distribution.</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *     * Neither the name of the NVIDIA CORPORATION nor the names of its contributors may be used</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *       to endorse or promote products derived from this software without specific prior written</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *       permission.</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS &quot;AS IS&quot; AND ANY EXPRESS OR</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL NVIDIA CORPORATION BE LIABLE</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> * STRICT LIABILITY, OR TOR (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> *</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> **************************************************************************************************/</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#pragma once</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &lt;vector&gt;</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="cutlass_8h.html">cutlass/cutlass.h</a>&quot;</span></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="matrix__traits_8h.html">cutlass/matrix_traits.h</a>&quot;</span></div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="tensor__ref_8h.html">cutlass/tensor_ref.h</a>&quot;</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="tensor__view_8h.html">cutlass/tensor_view.h</a>&quot;</span></div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="device__memory_8h.html">device_memory.h</a>&quot;</span></div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespacecutlass.html">cutlass</a> {</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="keyword">template</span> &lt;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;  <span class="keyword">typename</span> Element_,</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;  <span class="keyword">typename</span> Layout_</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;&gt;</div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html">   59</a></span>&#160;<span class="keyword">class </span><a class="code" href="classcutlass_1_1HostTensor.html">HostTensor</a> {</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="keyword">public</span>:</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">   63</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a> = Element_;</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a49c87d7b2438c8350b736ab6ea31c38a">   66</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1HostTensor.html#a49c87d7b2438c8350b736ab6ea31c38a">Layout</a> = Layout_;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#aa3458af41bf057e8bcfd895388a52659">   69</a></span>&#160;  <span class="keyword">static</span> <span class="keywordtype">int</span> <span class="keyword">const</span> <a class="code" href="classcutlass_1_1HostTensor.html#aa3458af41bf057e8bcfd895388a52659">kRank</a> = Layout::kRank;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a33679b84f59829c70457b9ff438101bf">   72</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1HostTensor.html#a33679b84f59829c70457b9ff438101bf">Index</a> = <span class="keyword">typename</span> Layout::Index;</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;</div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">   75</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> = <span class="keyword">typename</span> Layout::LongIndex;</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;</div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">   78</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">TensorCoord</a> = <span class="keyword">typename</span> Layout::TensorCoord;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a8775e63b9e6f320fb8611f5e8f7fc3b9">   81</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1HostTensor.html#a8775e63b9e6f320fb8611f5e8f7fc3b9">Stride</a> = <span class="keyword">typename</span> Layout::Stride;</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;</div><div class="line"><a name="l00084"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#add43f2f758df7f5e6e028c3cba0cf277">   84</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1TensorRef.html">TensorRef</a> = <a class="code" href="classcutlass_1_1TensorRef.html">TensorRef&lt;Element, Layout&gt;</a>;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#ae76a55dd7f4d827f042f9c9018567271">   87</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1HostTensor.html#ae76a55dd7f4d827f042f9c9018567271">ConstTensorRef</a> = <span class="keyword">typename</span> <a class="code" href="classcutlass_1_1TensorRef.html#ad3c5c9466713f62a5191e720827f34da">TensorRef::ConstTensorRef</a>;</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a78bc9c976c204822680075685cb8363e">   90</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> = <a class="code" href="classcutlass_1_1TensorView.html">TensorView&lt;Element, Layout&gt;</a>;</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;</div><div class="line"><a name="l00093"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#ac4445444c8f092dd1be47f1530affbaf">   93</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1HostTensor.html#ac4445444c8f092dd1be47f1530affbaf">ConstTensorView</a> = <span class="keyword">typename</span> <a class="code" href="classcutlass_1_1TensorView.html#a71def6d54ed28dfe3b17fde3e6461578">TensorView::ConstTensorView</a>;</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;</div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a33698c7aa33255e7a2e7abc298e28f39">   96</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1HostTensor.html#a33698c7aa33255e7a2e7abc298e28f39">Reference</a> = <span class="keyword">typename</span> <a class="code" href="classcutlass_1_1TensorRef.html#a0aba29ebf8715d217817a49356f95d3f">TensorRef::Reference</a>;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;</div><div class="line"><a name="l00099"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a4c6d967596e266ceab3d36f6c8d05152">   99</a></span>&#160;  <span class="keyword">using</span> <a class="code" href="classcutlass_1_1HostTensor.html#a4c6d967596e266ceab3d36f6c8d05152">ConstReference</a> = <span class="keyword">typename</span> ConstTensorRef::Reference;</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#ad8d8df8fbb877de1d29978288405bf5f">  102</a></span>&#160;  <span class="keyword">static</span> <span class="keywordtype">int</span> <span class="keyword">const</span> <a class="code" href="classcutlass_1_1HostTensor.html#ad8d8df8fbb877de1d29978288405bf5f">kElementsPerStoredItem</a> = (<a class="code" href="structcutlass_1_1sizeof__bits.html">sizeof_bits&lt;Element&gt;::value</a> &lt; 8 ? <span class="keyword">sizeof</span>(<a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a>) * 8 / <a class="code" href="structcutlass_1_1sizeof__bits.html">sizeof_bits&lt;Element&gt;::value</a> : 1);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160; <span class="keyword">private</span>:</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;  <span class="comment">// Data members</span></div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">TensorCoord</a> extent_;</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;</div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a49c87d7b2438c8350b736ab6ea31c38a">Layout</a> layout_;</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;  std::vector&lt;Element&gt; host_;</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;  <a class="code" href="structcutlass_1_1device__memory_1_1allocation.html">device_memory::allocation&lt;Element&gt;</a> device_;</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160; <span class="keyword">public</span>:</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;  <span class="comment">// Device and Host Methods</span></div><div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;  <span class="comment">//</span></div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;</div><div class="line"><a name="l00128"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#af50ce8b091c106ac88b75e15ab028868">  128</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#af50ce8b091c106ac88b75e15ab028868">HostTensor</a>() {}</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div><div class="line"><a name="l00131"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#abf381d496b50aad3df4bb72e3d891bac">  131</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#abf381d496b50aad3df4bb72e3d891bac">HostTensor</a>(</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">TensorCoord</a> <span class="keyword">const</span> &amp;<a class="code" href="classcutlass_1_1HostTensor.html#af1264450c122c1853231fc64b35a47b8">extent</a>,</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classcutlass_1_1HostTensor.html#a73430856f79bedb64f9cf6b2044f38e3">device_backed</a> = <span class="keyword">true</span></div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;  ) {</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;    this-&gt;<a class="code" href="classcutlass_1_1HostTensor.html#a898fc427538275635a55e7633cd89140">reset</a>(extent, Layout::packed(extent), <a class="code" href="classcutlass_1_1HostTensor.html#a73430856f79bedb64f9cf6b2044f38e3">device_backed</a>);</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;  }</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div><div class="line"><a name="l00140"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a9d71a824b0e1a4f1e8a88abecdff10b0">  140</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a9d71a824b0e1a4f1e8a88abecdff10b0">HostTensor</a>(</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">TensorCoord</a> <span class="keyword">const</span> &amp;<a class="code" href="classcutlass_1_1HostTensor.html#af1264450c122c1853231fc64b35a47b8">extent</a>,</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#a49c87d7b2438c8350b736ab6ea31c38a">Layout</a> <span class="keyword">const</span> &amp;<a class="code" href="classcutlass_1_1HostTensor.html#a9b78ff4fb7f317809b8cb8f70c557bea">layout</a>,</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="classcutlass_1_1HostTensor.html#a73430856f79bedb64f9cf6b2044f38e3">device_backed</a> = <span class="keyword">true</span></div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;  ) {</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;    this-&gt;<a class="code" href="classcutlass_1_1HostTensor.html#a898fc427538275635a55e7633cd89140">reset</a>(extent, layout, <a class="code" href="classcutlass_1_1HostTensor.html#a73430856f79bedb64f9cf6b2044f38e3">device_backed</a>);</div><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;  }</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;</div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a068d76dabce39c48b617ee7fe8d7edb8">  149</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a068d76dabce39c48b617ee7fe8d7edb8">~HostTensor</a>() { }</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;</div><div class="line"><a name="l00152"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a898fc427538275635a55e7633cd89140">  152</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#a898fc427538275635a55e7633cd89140">reset</a>() {</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    extent_ = <a class="code" href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">TensorCoord</a>();</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;    layout_ = Layout::packed(extent_);</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;    host_.clear();</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    device_.<a class="code" href="structcutlass_1_1device__memory_1_1allocation.html#aeef3a1cb8cfb96a2823e85f7fa52a31a">reset</a>();</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;  }</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a6405f217fc2a52f8e23180c9f8160899">  161</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#a6405f217fc2a52f8e23180c9f8160899">reserve</a>(</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;    <span class="keywordtype">size_t</span> count,                                        </div><div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="keywordtype">bool</span> device_backed_ = <span class="keyword">true</span>) {                        </div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    device_.<a class="code" href="structcutlass_1_1device__memory_1_1allocation.html#aeef3a1cb8cfb96a2823e85f7fa52a31a">reset</a>();</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;    host_.clear();</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    count /= <a class="code" href="classcutlass_1_1HostTensor.html#ad8d8df8fbb877de1d29978288405bf5f">kElementsPerStoredItem</a>;</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    host_.resize(count);</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    <span class="comment">// Allocate memory</span></div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a>* device_memory = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;    <span class="keywordflow">if</span> (device_backed_) {</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;      device_memory = device_memory::allocate&lt;Element&gt;(count);</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    }</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    device_.<a class="code" href="structcutlass_1_1device__memory_1_1allocation.html#aeef3a1cb8cfb96a2823e85f7fa52a31a">reset</a>(device_memory, device_backed_ ? count : 0);</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;  }</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div><div class="line"><a name="l00182"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a4f23ad5953f9cd5dff8e97d9edbc0cf0">  182</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#a4f23ad5953f9cd5dff8e97d9edbc0cf0">reset</a>(</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">TensorCoord</a> <span class="keyword">const</span> &amp;<a class="code" href="classcutlass_1_1HostTensor.html#af1264450c122c1853231fc64b35a47b8">extent</a>,                           </div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#a49c87d7b2438c8350b736ab6ea31c38a">Layout</a> <span class="keyword">const</span> &amp;<a class="code" href="classcutlass_1_1HostTensor.html#a9b78ff4fb7f317809b8cb8f70c557bea">layout</a>,                                </div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;    <span class="keywordtype">bool</span> device_backed_ = <span class="keyword">true</span>) {                        </div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    extent_ = <a class="code" href="classcutlass_1_1HostTensor.html#af1264450c122c1853231fc64b35a47b8">extent</a>;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;    layout_ = <a class="code" href="classcutlass_1_1HostTensor.html#a9b78ff4fb7f317809b8cb8f70c557bea">layout</a>;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#a6405f217fc2a52f8e23180c9f8160899">reserve</a>(<span class="keywordtype">size_t</span>(layout_.capacity(extent_)), device_backed_);</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;  }</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div><div class="line"><a name="l00195"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#ab91b456881d5f9c0f52a4bc89d448d55">  195</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#ab91b456881d5f9c0f52a4bc89d448d55">reset</a>(</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">TensorCoord</a> <span class="keyword">const</span> &amp;<a class="code" href="classcutlass_1_1HostTensor.html#af1264450c122c1853231fc64b35a47b8">extent</a>,                           </div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    <span class="keywordtype">bool</span> device_backed_ = <span class="keyword">true</span>) {                        </div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#a898fc427538275635a55e7633cd89140">reset</a>(extent, Layout::packed(extent), device_backed_);</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;  }</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;</div><div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#ac61cee5b25585439f4ccc7d7249ee853">  204</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#ac61cee5b25585439f4ccc7d7249ee853">resize</a>(</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">TensorCoord</a> <span class="keyword">const</span> &amp;<a class="code" href="classcutlass_1_1HostTensor.html#af1264450c122c1853231fc64b35a47b8">extent</a>,                           </div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#a49c87d7b2438c8350b736ab6ea31c38a">Layout</a> <span class="keyword">const</span> &amp;<a class="code" href="classcutlass_1_1HostTensor.html#a9b78ff4fb7f317809b8cb8f70c557bea">layout</a>,                                </div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <span class="keywordtype">bool</span> device_backed_ = <span class="keyword">true</span>) {                        </div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    extent_ = <a class="code" href="classcutlass_1_1HostTensor.html#af1264450c122c1853231fc64b35a47b8">extent</a>;</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    layout_ = <a class="code" href="classcutlass_1_1HostTensor.html#a9b78ff4fb7f317809b8cb8f70c557bea">layout</a>;</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> new_size = size_t(layout_.capacity(extent_));</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    <span class="keywordflow">if</span> (<span class="keyword">static_cast&lt;</span>decltype(host_.<a class="code" href="classcutlass_1_1HostTensor.html#aacf36383bd4608f6d30c561ce4851b83">size</a>())<span class="keyword">&gt;</span>(new_size) &gt; host_.size()) {</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;      <a class="code" href="classcutlass_1_1HostTensor.html#a6405f217fc2a52f8e23180c9f8160899">reserve</a>(new_size);</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    }</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;  }</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;</div><div class="line"><a name="l00221"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a784d0b84de512c1bff131710226e2338">  221</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#a784d0b84de512c1bff131710226e2338">resize</a>(</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">TensorCoord</a> <span class="keyword">const</span> &amp;<a class="code" href="classcutlass_1_1HostTensor.html#af1264450c122c1853231fc64b35a47b8">extent</a>,                           </div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    <span class="keywordtype">bool</span> device_backed_ = <span class="keyword">true</span>) {                        </div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#ac61cee5b25585439f4ccc7d7249ee853">resize</a>(extent, Layout::packed(extent), device_backed_);</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;  }</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;</div><div class="line"><a name="l00229"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#aacf36383bd4608f6d30c561ce4851b83">  229</a></span>&#160;  <span class="keywordtype">size_t</span> <a class="code" href="classcutlass_1_1HostTensor.html#aacf36383bd4608f6d30c561ce4851b83">size</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    <span class="keywordflow">return</span> host_.size() * <a class="code" href="classcutlass_1_1HostTensor.html#ad8d8df8fbb877de1d29978288405bf5f">kElementsPerStoredItem</a>;</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;  }</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;</div><div class="line"><a name="l00234"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">  234</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> <a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;    <span class="keywordflow">return</span> layout_.capacity(extent_) * <a class="code" href="classcutlass_1_1HostTensor.html#ad8d8df8fbb877de1d29978288405bf5f">kElementsPerStoredItem</a>;</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;  }</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;</div><div class="line"><a name="l00239"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a7d34307e09d4ea09d68abbf31fe33788">  239</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a> * <a class="code" href="classcutlass_1_1HostTensor.html#a7d34307e09d4ea09d68abbf31fe33788">host_data</a>() { <span class="keywordflow">return</span> host_.data(); }</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;</div><div class="line"><a name="l00242"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a252ce9281a40863f32be25d3b40d6373">  242</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a> * <a class="code" href="classcutlass_1_1HostTensor.html#a252ce9281a40863f32be25d3b40d6373">host_data_ptr_offset</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> ptr_element_offset) { <span class="keywordflow">return</span> host_.data() + ptr_element_offset; }</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;</div><div class="line"><a name="l00245"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#adafe2bee53260d47bc60479c50953f57">  245</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a33698c7aa33255e7a2e7abc298e28f39">Reference</a> <a class="code" href="classcutlass_1_1HostTensor.html#adafe2bee53260d47bc60479c50953f57">host_data</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> idx) {</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structcutlass_1_1ReferenceFactory.html">ReferenceFactory&lt;Element&gt;::get</a>(<a class="code" href="classcutlass_1_1HostTensor.html#a7d34307e09d4ea09d68abbf31fe33788">host_data</a>(), idx);</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;  }</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;</div><div class="line"><a name="l00250"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a3dd62ca461666b3ac7e690e2befecaae">  250</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a> <span class="keyword">const</span> * <a class="code" href="classcutlass_1_1HostTensor.html#a3dd62ca461666b3ac7e690e2befecaae">host_data</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> host_.data(); }</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;</div><div class="line"><a name="l00253"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a7741d51bf7d241d4821e52e47b704c69">  253</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a4c6d967596e266ceab3d36f6c8d05152">ConstReference</a> <a class="code" href="classcutlass_1_1HostTensor.html#a7741d51bf7d241d4821e52e47b704c69">host_data</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> idx)<span class="keyword"> const </span>{</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="structcutlass_1_1ReferenceFactory.html">ReferenceFactory&lt;Element const&gt;::get</a>(<a class="code" href="classcutlass_1_1HostTensor.html#a7d34307e09d4ea09d68abbf31fe33788">host_data</a>(), idx);</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;  }</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;</div><div class="line"><a name="l00258"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#aca2b28a16fc92d29102d00f154a1dfd1">  258</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a> * <a class="code" href="classcutlass_1_1HostTensor.html#aca2b28a16fc92d29102d00f154a1dfd1">device_data</a>() { <span class="keywordflow">return</span> device_.<a class="code" href="structcutlass_1_1device__memory_1_1allocation.html#a86356748c671059942168502dd58684a">get</a>(); }</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;</div><div class="line"><a name="l00261"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a81043b0539c8d18c40957411dd149e28">  261</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a> * <a class="code" href="classcutlass_1_1HostTensor.html#a81043b0539c8d18c40957411dd149e28">device_data_ptr_offset</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> ptr_element_offset) { <span class="keywordflow">return</span> device_.<a class="code" href="structcutlass_1_1device__memory_1_1allocation.html#a86356748c671059942168502dd58684a">get</a>() + ptr_element_offset; }</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;</div><div class="line"><a name="l00264"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#abecb0dce978ea2c542d7d87a35f7997a">  264</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a> <span class="keyword">const</span> * <a class="code" href="classcutlass_1_1HostTensor.html#abecb0dce978ea2c542d7d87a35f7997a">device_data</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> device_.<a class="code" href="structcutlass_1_1device__memory_1_1allocation.html#a86356748c671059942168502dd58684a">get</a>(); }</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;</div><div class="line"><a name="l00267"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#ac921be812016052c690d2dc808d415f1">  267</a></span>&#160;  <a class="code" href="classcutlass_1_1TensorRef.html">TensorRef</a> <a class="code" href="classcutlass_1_1HostTensor.html#ac921be812016052c690d2dc808d415f1">host_ref</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> ptr_element_offset=0) { <span class="keywordflow">return</span> <a class="code" href="classcutlass_1_1HostTensor.html#add43f2f758df7f5e6e028c3cba0cf277">TensorRef</a>(<a class="code" href="classcutlass_1_1HostTensor.html#a252ce9281a40863f32be25d3b40d6373">host_data_ptr_offset</a>(ptr_element_offset), layout_); }</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;</div><div class="line"><a name="l00270"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a3c5b60678dfa105b10c87dfaab4cf395">  270</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#ae76a55dd7f4d827f042f9c9018567271">ConstTensorRef</a> <a class="code" href="classcutlass_1_1HostTensor.html#a3c5b60678dfa105b10c87dfaab4cf395">host_ref</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> ptr_element_offset=0)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classcutlass_1_1HostTensor.html#ae76a55dd7f4d827f042f9c9018567271">ConstTensorRef</a>(<a class="code" href="classcutlass_1_1HostTensor.html#a252ce9281a40863f32be25d3b40d6373">host_data_ptr_offset</a>(ptr_element_offset), layout_); }</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;</div><div class="line"><a name="l00273"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a55a73e5ff7c7404c0bdee5f2b578b876">  273</a></span>&#160;  <a class="code" href="classcutlass_1_1TensorRef.html">TensorRef</a> <a class="code" href="classcutlass_1_1HostTensor.html#a55a73e5ff7c7404c0bdee5f2b578b876">device_ref</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> ptr_element_offset=0) {</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classcutlass_1_1HostTensor.html#add43f2f758df7f5e6e028c3cba0cf277">TensorRef</a>(<a class="code" href="classcutlass_1_1HostTensor.html#a81043b0539c8d18c40957411dd149e28">device_data_ptr_offset</a>(ptr_element_offset), layout_);</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;  }</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;</div><div class="line"><a name="l00278"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a4bf91f711ef17492809c09d53364cb35">  278</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#ae76a55dd7f4d827f042f9c9018567271">ConstTensorRef</a> <a class="code" href="classcutlass_1_1HostTensor.html#a4bf91f711ef17492809c09d53364cb35">device_ref</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> ptr_element_offset=0)<span class="keyword"> const </span>{</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classcutlass_1_1HostTensor.html#add43f2f758df7f5e6e028c3cba0cf277">TensorRef</a>(<a class="code" href="classcutlass_1_1HostTensor.html#a81043b0539c8d18c40957411dd149e28">device_data_ptr_offset</a>(ptr_element_offset), layout_);</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;  }</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;</div><div class="line"><a name="l00283"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a75ce60d02c9d8fdcbcaceecc6b3ec7fa">  283</a></span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> <a class="code" href="classcutlass_1_1HostTensor.html#a75ce60d02c9d8fdcbcaceecc6b3ec7fa">host_view</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> ptr_element_offset=0) {</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classcutlass_1_1HostTensor.html#a78bc9c976c204822680075685cb8363e">TensorView</a>(<a class="code" href="classcutlass_1_1HostTensor.html#a252ce9281a40863f32be25d3b40d6373">host_data_ptr_offset</a>(ptr_element_offset), layout_, extent_);</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;  }</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;</div><div class="line"><a name="l00288"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a232e640ebb4b8cf21b44653d7800c5a7">  288</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#ac4445444c8f092dd1be47f1530affbaf">ConstTensorView</a> <a class="code" href="classcutlass_1_1HostTensor.html#a232e640ebb4b8cf21b44653d7800c5a7">host_view</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> ptr_element_offset=0)<span class="keyword"> const </span>{</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classcutlass_1_1HostTensor.html#ac4445444c8f092dd1be47f1530affbaf">ConstTensorView</a>(<a class="code" href="classcutlass_1_1HostTensor.html#a252ce9281a40863f32be25d3b40d6373">host_data_ptr_offset</a>(ptr_element_offset), layout_, extent_);</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;  }</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;</div><div class="line"><a name="l00293"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a075b666917a43c9bc168bfff6db27203">  293</a></span>&#160;  <a class="code" href="classcutlass_1_1TensorView.html">TensorView</a> <a class="code" href="classcutlass_1_1HostTensor.html#a075b666917a43c9bc168bfff6db27203">device_view</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> ptr_element_offset=0) {</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classcutlass_1_1HostTensor.html#a78bc9c976c204822680075685cb8363e">TensorView</a>(<a class="code" href="classcutlass_1_1HostTensor.html#a81043b0539c8d18c40957411dd149e28">device_data_ptr_offset</a>(ptr_element_offset), layout_, extent_);</div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;  }</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;</div><div class="line"><a name="l00298"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a6d1c49888cf678d3d5469eba4e911337">  298</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#ac4445444c8f092dd1be47f1530affbaf">ConstTensorView</a> <a class="code" href="classcutlass_1_1HostTensor.html#a6d1c49888cf678d3d5469eba4e911337">device_view</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> ptr_element_offset=0)<span class="keyword"> const </span>{</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classcutlass_1_1HostTensor.html#ac4445444c8f092dd1be47f1530affbaf">ConstTensorView</a>(<a class="code" href="classcutlass_1_1HostTensor.html#a81043b0539c8d18c40957411dd149e28">device_data_ptr_offset</a>(ptr_element_offset), layout_, extent_);</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;  }</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;</div><div class="line"><a name="l00303"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a73430856f79bedb64f9cf6b2044f38e3">  303</a></span>&#160;  <span class="keywordtype">bool</span> <a class="code" href="classcutlass_1_1HostTensor.html#a73430856f79bedb64f9cf6b2044f38e3">device_backed</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;    <span class="keywordflow">return</span> (device_.<a class="code" href="structcutlass_1_1device__memory_1_1allocation.html#a86356748c671059942168502dd58684a">get</a>() == <span class="keyword">nullptr</span>) ? <span class="keyword">false</span> : <span class="keyword">true</span>;</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;  }</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;</div><div class="line"><a name="l00309"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a9b78ff4fb7f317809b8cb8f70c557bea">  309</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a49c87d7b2438c8350b736ab6ea31c38a">Layout</a> &amp; <a class="code" href="classcutlass_1_1HostTensor.html#a9b78ff4fb7f317809b8cb8f70c557bea">layout</a>() {</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;    <span class="keywordflow">return</span> layout_;</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;  }</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;</div><div class="line"><a name="l00314"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a61fe837629d7663cbb93ea8cfc177077">  314</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a49c87d7b2438c8350b736ab6ea31c38a">Layout</a> <a class="code" href="classcutlass_1_1HostTensor.html#a61fe837629d7663cbb93ea8cfc177077">layout</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;    <span class="keywordflow">return</span> layout_;</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;  }</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;</div><div class="line"><a name="l00319"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a23976f8c123de032cf4a2632a894fcf2">  319</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a8775e63b9e6f320fb8611f5e8f7fc3b9">Stride</a> <a class="code" href="classcutlass_1_1HostTensor.html#a23976f8c123de032cf4a2632a894fcf2">stride</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    <span class="keywordflow">return</span> layout_.stride();</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;  }</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;</div><div class="line"><a name="l00324"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a241cd2fe7dfe62b3e68ef75334bd2fda">  324</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a8775e63b9e6f320fb8611f5e8f7fc3b9">Stride</a> &amp; <a class="code" href="classcutlass_1_1HostTensor.html#a241cd2fe7dfe62b3e68ef75334bd2fda">stride</a>() {</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;    <span class="keywordflow">return</span> layout_.stride();</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;  }</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;</div><div class="line"><a name="l00329"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a4a16e522cac85735cfcb056dc928de18">  329</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a33679b84f59829c70457b9ff438101bf">Index</a> <a class="code" href="classcutlass_1_1HostTensor.html#a4a16e522cac85735cfcb056dc928de18">stride</a>(<span class="keywordtype">int</span> dim)<span class="keyword"> const </span>{</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;    <span class="keywordflow">return</span> layout_.stride().at(dim);</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;  }</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;</div><div class="line"><a name="l00334"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a439278acead2d26cb453d2949019fb68">  334</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a33679b84f59829c70457b9ff438101bf">Index</a> &amp; <a class="code" href="classcutlass_1_1HostTensor.html#a439278acead2d26cb453d2949019fb68">stride</a>(<span class="keywordtype">int</span> dim) {</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;    <span class="keywordflow">return</span> layout_.stride().at(dim);</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;  }</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;</div><div class="line"><a name="l00339"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#ac3e08629bab5304f999fb5115453a714">  339</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> <a class="code" href="classcutlass_1_1HostTensor.html#ac3e08629bab5304f999fb5115453a714">offset</a>(<a class="code" href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">TensorCoord</a> <span class="keyword">const</span>&amp; coord)<span class="keyword"> const </span>{</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;    <span class="keywordflow">return</span> layout_(coord);</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;  }</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;</div><div class="line"><a name="l00344"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#ab1253b57fd95f16b2dec9e36e84051d4">  344</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a33698c7aa33255e7a2e7abc298e28f39">Reference</a> <a class="code" href="classcutlass_1_1HostTensor.html#ab1253b57fd95f16b2dec9e36e84051d4">at</a>(<a class="code" href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">TensorCoord</a> <span class="keyword">const</span>&amp; coord) {</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classcutlass_1_1HostTensor.html#a7d34307e09d4ea09d68abbf31fe33788">host_data</a>(<a class="code" href="classcutlass_1_1HostTensor.html#ac3e08629bab5304f999fb5115453a714">offset</a>(coord));</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;  }</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;</div><div class="line"><a name="l00349"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#ae261f1b7ef78cc52dcb77f1a2fd05b69">  349</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#a4c6d967596e266ceab3d36f6c8d05152">ConstReference</a> <a class="code" href="classcutlass_1_1HostTensor.html#ae261f1b7ef78cc52dcb77f1a2fd05b69">at</a>(<a class="code" href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">TensorCoord</a> <span class="keyword">const</span>&amp; coord)<span class="keyword"> const </span>{</div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classcutlass_1_1HostTensor.html#a7d34307e09d4ea09d68abbf31fe33788">host_data</a>(<a class="code" href="classcutlass_1_1HostTensor.html#ac3e08629bab5304f999fb5115453a714">offset</a>(coord));</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;  }</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;</div><div class="line"><a name="l00354"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#af1264450c122c1853231fc64b35a47b8">  354</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">TensorCoord</a> <a class="code" href="classcutlass_1_1HostTensor.html#af1264450c122c1853231fc64b35a47b8">extent</a>()<span class="keyword"> const </span>{</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;    <span class="keywordflow">return</span> extent_;</div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;  }</div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;</div><div class="line"><a name="l00359"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a8a947176a4ddab5b784c98a0f1896892">  359</a></span>&#160;  <a class="code" href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">TensorCoord</a> &amp; <a class="code" href="classcutlass_1_1HostTensor.html#a8a947176a4ddab5b784c98a0f1896892">extent</a>() {</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;    <span class="keywordflow">return</span> extent_;</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;  }</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;</div><div class="line"><a name="l00364"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#aea45851485df33ee2afb2a30bb82ebfc">  364</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#aea45851485df33ee2afb2a30bb82ebfc">sync_host</a>() {</div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classcutlass_1_1HostTensor.html#a73430856f79bedb64f9cf6b2044f38e3">device_backed</a>()) {</div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;      <a class="code" href="namespacecutlass_1_1device__memory.html#a5333f291105136d2e8e4c31329d93c31">device_memory::copy_to_host</a>(</div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;          <a class="code" href="classcutlass_1_1HostTensor.html#a7d34307e09d4ea09d68abbf31fe33788">host_data</a>(), <a class="code" href="classcutlass_1_1HostTensor.html#aca2b28a16fc92d29102d00f154a1dfd1">device_data</a>(), <a class="code" href="classcutlass_1_1HostTensor.html#aacf36383bd4608f6d30c561ce4851b83">size</a>());</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;    }</div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;  }</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;</div><div class="line"><a name="l00372"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#af339765c90429fe99b98a0da6a627421">  372</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#af339765c90429fe99b98a0da6a627421">sync_device</a>() {</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classcutlass_1_1HostTensor.html#a73430856f79bedb64f9cf6b2044f38e3">device_backed</a>()) {</div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;      <a class="code" href="namespacecutlass_1_1device__memory.html#adce1a75429c0eae9d34dc18944777325">device_memory::copy_to_device</a>(</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;          <a class="code" href="classcutlass_1_1HostTensor.html#aca2b28a16fc92d29102d00f154a1dfd1">device_data</a>(), <a class="code" href="classcutlass_1_1HostTensor.html#a7d34307e09d4ea09d68abbf31fe33788">host_data</a>(), <a class="code" href="classcutlass_1_1HostTensor.html#aacf36383bd4608f6d30c561ce4851b83">size</a>());</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;    }</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;  }</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;</div><div class="line"><a name="l00380"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a2b4858efb0356a6fc01bb9f55f0ad3b2">  380</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#a2b4858efb0356a6fc01bb9f55f0ad3b2">copy_in_device_to_host</a>(</div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a> <span class="keyword">const</span>* ptr_device,        </div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> count = -1) {           </div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;    <span class="keywordflow">if</span> (count &lt; 0) {</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;      count = <a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>();</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;    }</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;    <span class="keywordflow">else</span> {</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;      count = <a class="code" href="platform_8h.html#a39e234a3e3b0018b58df720bcb143420">__NV_STD_MIN</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>(), count);</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;    }</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;    <a class="code" href="namespacecutlass_1_1device__memory.html#a5333f291105136d2e8e4c31329d93c31">device_memory::copy_to_host</a>(</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;      <a class="code" href="classcutlass_1_1HostTensor.html#a7d34307e09d4ea09d68abbf31fe33788">host_data</a>(), ptr_device, count);</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;  }</div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;</div><div class="line"><a name="l00395"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a5686ea068c8f3e820ccff015e95bc474">  395</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#a5686ea068c8f3e820ccff015e95bc474">copy_in_device_to_device</a>(</div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a> <span class="keyword">const</span>* ptr_device,        </div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> count = -1) {           </div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;</div><div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;    <span class="keywordflow">if</span> (count &lt; 0) {</div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;      count = <a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>();</div><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;    }</div><div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;    <span class="keywordflow">else</span> {</div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;      count = <a class="code" href="platform_8h.html#a39e234a3e3b0018b58df720bcb143420">__NV_STD_MIN</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>(), count);</div><div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;    }</div><div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;    <a class="code" href="namespacecutlass_1_1device__memory.html#a8ff6151b081442db9af7421110c0242b">device_memory::copy_device_to_device</a>(</div><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;      <a class="code" href="classcutlass_1_1HostTensor.html#aca2b28a16fc92d29102d00f154a1dfd1">device_data</a>(), ptr_device, count);</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;  }</div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;</div><div class="line"><a name="l00410"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#ad385330c69ecd7bd0b6c3660815253fa">  410</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#ad385330c69ecd7bd0b6c3660815253fa">copy_in_host_to_device</a>(</div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a> <span class="keyword">const</span>* ptr_host,          </div><div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> count = -1) {           </div><div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;</div><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;    <span class="keywordflow">if</span> (count &lt; 0) {</div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;      count = <a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>();</div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;    }</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;    <span class="keywordflow">else</span> {</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;      count = <a class="code" href="platform_8h.html#a39e234a3e3b0018b58df720bcb143420">__NV_STD_MIN</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>(), count);</div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;    }</div><div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;    <a class="code" href="namespacecutlass_1_1device__memory.html#adce1a75429c0eae9d34dc18944777325">device_memory::copy_to_device</a>(</div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;      <a class="code" href="classcutlass_1_1HostTensor.html#aca2b28a16fc92d29102d00f154a1dfd1">device_data</a>(), ptr_host, count);</div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;  }</div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;</div><div class="line"><a name="l00425"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#ae11229ea69460ca174c5e6f9815eb97f">  425</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#ae11229ea69460ca174c5e6f9815eb97f">copy_in_host_to_host</a>(</div><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a> <span class="keyword">const</span>* ptr_host,          </div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> count = -1) {           </div><div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;</div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;    <span class="keywordflow">if</span> (count &lt; 0) {</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;      count = <a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>();</div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;    }</div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;    <span class="keywordflow">else</span> {</div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;      count = <a class="code" href="platform_8h.html#a39e234a3e3b0018b58df720bcb143420">__NV_STD_MIN</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>(), count);</div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;    }</div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;    <a class="code" href="namespacecutlass_1_1device__memory.html#a0a3ab26e6c9a8aae6b09bfb3e4eb24e8">device_memory::copy_host_to_host</a>(</div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;      <a class="code" href="classcutlass_1_1HostTensor.html#a7d34307e09d4ea09d68abbf31fe33788">host_data</a>(), ptr_host, count);</div><div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;  }</div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;</div><div class="line"><a name="l00440"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#ab3051d2842b3aa3815e2ea5f53abfc2a">  440</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#ab3051d2842b3aa3815e2ea5f53abfc2a">copy_out_device_to_host</a>(</div><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a> * ptr_host,               </div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> count = -1)<span class="keyword"> const </span>{     </div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;</div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;    <span class="keywordflow">if</span> (count &lt; 0) {</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;      count = <a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>();</div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;    }</div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;    <span class="keywordflow">else</span> {</div><div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;      count = <a class="code" href="platform_8h.html#a39e234a3e3b0018b58df720bcb143420">__NV_STD_MIN</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>(), count);</div><div class="line"><a name="l00449"></a><span class="lineno">  449</span>&#160;    }</div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;    <a class="code" href="namespacecutlass_1_1device__memory.html#a5333f291105136d2e8e4c31329d93c31">device_memory::copy_to_host</a>(</div><div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;      ptr_host, <a class="code" href="classcutlass_1_1HostTensor.html#aca2b28a16fc92d29102d00f154a1dfd1">device_data</a>(), count);</div><div class="line"><a name="l00452"></a><span class="lineno">  452</span>&#160;  }</div><div class="line"><a name="l00453"></a><span class="lineno">  453</span>&#160;</div><div class="line"><a name="l00455"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#ab7179440d39b0445113b30b7a460a1ec">  455</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#ab7179440d39b0445113b30b7a460a1ec">copy_out_device_to_device</a>(</div><div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a> * ptr_device,             </div><div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> count = -1)<span class="keyword"> const </span>{     </div><div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;</div><div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;    <span class="keywordflow">if</span> (count &lt; 0) {</div><div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;      count = <a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>();</div><div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;    }</div><div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;    <span class="keywordflow">else</span> {</div><div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;      count = <a class="code" href="platform_8h.html#a39e234a3e3b0018b58df720bcb143420">__NV_STD_MIN</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>(), count);</div><div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;    }</div><div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;    <a class="code" href="namespacecutlass_1_1device__memory.html#a8ff6151b081442db9af7421110c0242b">device_memory::copy_device_to_device</a>(</div><div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;      ptr_device, <a class="code" href="classcutlass_1_1HostTensor.html#aca2b28a16fc92d29102d00f154a1dfd1">device_data</a>(), count);</div><div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;  }</div><div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;</div><div class="line"><a name="l00470"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#abeefdb8bccb2d8d751fdb22fa7e8ef0c">  470</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#abeefdb8bccb2d8d751fdb22fa7e8ef0c">copy_out_host_to_device</a>(</div><div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a> * ptr_device,             </div><div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> count = -1)<span class="keyword"> const </span>{     </div><div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;</div><div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;    <span class="keywordflow">if</span> (count &lt; 0) {</div><div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;      count = <a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>();</div><div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;    }</div><div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;    <span class="keywordflow">else</span> {</div><div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;      count = <a class="code" href="platform_8h.html#a39e234a3e3b0018b58df720bcb143420">__NV_STD_MIN</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>(), count);</div><div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;    }</div><div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;    <a class="code" href="namespacecutlass_1_1device__memory.html#adce1a75429c0eae9d34dc18944777325">device_memory::copy_to_device</a>(</div><div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;      ptr_device, <a class="code" href="classcutlass_1_1HostTensor.html#a7d34307e09d4ea09d68abbf31fe33788">host_data</a>(), count);</div><div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;  }</div><div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;</div><div class="line"><a name="l00485"></a><span class="lineno"><a class="line" href="classcutlass_1_1HostTensor.html#a40da221db96cfda76ba5623856c66bf1">  485</a></span>&#160;  <span class="keywordtype">void</span> <a class="code" href="classcutlass_1_1HostTensor.html#a40da221db96cfda76ba5623856c66bf1">copy_out_host_to_host</a>(</div><div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">Element</a> * ptr_host,               </div><div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;    <a class="code" href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">LongIndex</a> count = -1)<span class="keyword"> const </span>{     </div><div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;</div><div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;    <span class="keywordflow">if</span> (count &lt; 0) {</div><div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;      count = <a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>();</div><div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;    }</div><div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;    <span class="keywordflow">else</span> {</div><div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;      count = <a class="code" href="platform_8h.html#a39e234a3e3b0018b58df720bcb143420">__NV_STD_MIN</a>(<a class="code" href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">capacity</a>(), count);</div><div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;    }</div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;    <a class="code" href="namespacecutlass_1_1device__memory.html#a0a3ab26e6c9a8aae6b09bfb3e4eb24e8">device_memory::copy_host_to_host</a>(</div><div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;      ptr_host, <a class="code" href="classcutlass_1_1HostTensor.html#a7d34307e09d4ea09d68abbf31fe33788">host_data</a>(), count);</div><div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;  }</div><div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;};</div><div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;</div><div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;</div><div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;}  <span class="comment">// namespace cutlass</span></div><div class="ttc" id="classcutlass_1_1HostTensor_html_a241cd2fe7dfe62b3e68ef75334bd2fda"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a241cd2fe7dfe62b3e68ef75334bd2fda">cutlass::HostTensor::stride</a></div><div class="ttdeci">Stride &amp; stride()</div><div class="ttdoc">Returns the layout object&amp;#39;s stride vector. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:324</div></div>
<div class="ttc" id="namespacecutlass_html"><div class="ttname"><a href="namespacecutlass.html">cutlass</a></div><div class="ttdef"><b>Definition:</b> aligned_buffer.h:35</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a9d71a824b0e1a4f1e8a88abecdff10b0"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a9d71a824b0e1a4f1e8a88abecdff10b0">cutlass::HostTensor::HostTensor</a></div><div class="ttdeci">HostTensor(TensorCoord const &amp;extent, Layout const &amp;layout, bool device_backed=true)</div><div class="ttdoc">Constructs a tensor given an extent and layout. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:140</div></div>
<div class="ttc" id="tensor__ref_8h_html"><div class="ttname"><a href="tensor__ref_8h.html">tensor_ref.h</a></div><div class="ttdoc">Defines a structure containing strides, bounds, and a pointer to tensor data. </div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a8775e63b9e6f320fb8611f5e8f7fc3b9"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a8775e63b9e6f320fb8611f5e8f7fc3b9">cutlass::HostTensor::Stride</a></div><div class="ttdeci">typename Layout::Stride Stride</div><div class="ttdoc">Layout&amp;#39;s stride vector. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:81</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_ad385330c69ecd7bd0b6c3660815253fa"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#ad385330c69ecd7bd0b6c3660815253fa">cutlass::HostTensor::copy_in_host_to_device</a></div><div class="ttdeci">void copy_in_host_to_device(Element const *ptr_host, LongIndex count=-1)</div><div class="ttdoc">Copy data from a caller-supplied device pointer into host memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:410</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a439278acead2d26cb453d2949019fb68"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a439278acead2d26cb453d2949019fb68">cutlass::HostTensor::stride</a></div><div class="ttdeci">Index &amp; stride(int dim)</div><div class="ttdoc">Returns the layout object&amp;#39;s stride in a given physical dimension. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:334</div></div>
<div class="ttc" id="namespacecutlass_1_1device__memory_html_adce1a75429c0eae9d34dc18944777325"><div class="ttname"><a href="namespacecutlass_1_1device__memory.html#adce1a75429c0eae9d34dc18944777325">cutlass::device_memory::copy_to_device</a></div><div class="ttdeci">void copy_to_device(T *dst, T const *src, size_t count=1)</div><div class="ttdef"><b>Definition:</b> device_memory.h:81</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a6d1c49888cf678d3d5469eba4e911337"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a6d1c49888cf678d3d5469eba4e911337">cutlass::HostTensor::device_view</a></div><div class="ttdeci">ConstTensorView device_view(LongIndex ptr_element_offset=0) const </div><div class="ttdoc">Accesses the tensor reference pointing to data. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:298</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_aa42c24683584f21aee1a4333ebaefccc"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#aa42c24683584f21aee1a4333ebaefccc">cutlass::HostTensor::LongIndex</a></div><div class="ttdeci">typename Layout::LongIndex LongIndex</div><div class="ttdoc">Long index used for pointer offsets. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:75</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a49c87d7b2438c8350b736ab6ea31c38a"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a49c87d7b2438c8350b736ab6ea31c38a">cutlass::HostTensor::Layout</a></div><div class="ttdeci">Layout_ Layout</div><div class="ttdoc">Mapping function from logical coordinate to linear memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:66</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a232e640ebb4b8cf21b44653d7800c5a7"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a232e640ebb4b8cf21b44653d7800c5a7">cutlass::HostTensor::host_view</a></div><div class="ttdeci">ConstTensorView host_view(LongIndex ptr_element_offset=0) const </div><div class="ttdoc">Accesses the tensor reference pointing to data. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:288</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_aa6ea111e8fcba15c07f0cf679e1eec7f"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#aa6ea111e8fcba15c07f0cf679e1eec7f">cutlass::HostTensor::capacity</a></div><div class="ttdeci">LongIndex capacity() const </div><div class="ttdoc">Returns the logical capacity based on extent and layout. May differ from size(). </div><div class="ttdef"><b>Definition:</b> host_tensor.h:234</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a40da221db96cfda76ba5623856c66bf1"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a40da221db96cfda76ba5623856c66bf1">cutlass::HostTensor::copy_out_host_to_host</a></div><div class="ttdeci">void copy_out_host_to_host(Element *ptr_host, LongIndex count=-1) const </div><div class="ttdoc">Copy data from a caller-supplied device pointer into host memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:485</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_aea45851485df33ee2afb2a30bb82ebfc"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#aea45851485df33ee2afb2a30bb82ebfc">cutlass::HostTensor::sync_host</a></div><div class="ttdeci">void sync_host()</div><div class="ttdoc">Copies data from device to host. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:364</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a61fe837629d7663cbb93ea8cfc177077"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a61fe837629d7663cbb93ea8cfc177077">cutlass::HostTensor::layout</a></div><div class="ttdeci">Layout layout() const </div><div class="ttdoc">Returns the layout object. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:314</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_ae11229ea69460ca174c5e6f9815eb97f"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#ae11229ea69460ca174c5e6f9815eb97f">cutlass::HostTensor::copy_in_host_to_host</a></div><div class="ttdeci">void copy_in_host_to_host(Element const *ptr_host, LongIndex count=-1)</div><div class="ttdoc">Copy data from a caller-supplied device pointer into host memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:425</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_aca2b28a16fc92d29102d00f154a1dfd1"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#aca2b28a16fc92d29102d00f154a1dfd1">cutlass::HostTensor::device_data</a></div><div class="ttdeci">Element * device_data()</div><div class="ttdoc">Gets pointer to device data. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:258</div></div>
<div class="ttc" id="structcutlass_1_1device__memory_1_1allocation_html_a86356748c671059942168502dd58684a"><div class="ttname"><a href="structcutlass_1_1device__memory_1_1allocation.html#a86356748c671059942168502dd58684a">cutlass::device_memory::allocation::get</a></div><div class="ttdeci">T * get() const </div><div class="ttdoc">Returns a pointer to the managed object. </div><div class="ttdef"><b>Definition:</b> device_memory.h:162</div></div>
<div class="ttc" id="structcutlass_1_1device__memory_1_1allocation_html_aeef3a1cb8cfb96a2823e85f7fa52a31a"><div class="ttname"><a href="structcutlass_1_1device__memory_1_1allocation.html#aeef3a1cb8cfb96a2823e85f7fa52a31a">cutlass::device_memory::allocation::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdoc">Deletes the managed object and resets capacity to zero. </div><div class="ttdef"><b>Definition:</b> device_memory.h:171</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_abecb0dce978ea2c542d7d87a35f7997a"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#abecb0dce978ea2c542d7d87a35f7997a">cutlass::HostTensor::device_data</a></div><div class="ttdeci">Element const * device_data() const </div><div class="ttdoc">Gets pointer to device data. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:264</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_ad8d8df8fbb877de1d29978288405bf5f"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#ad8d8df8fbb877de1d29978288405bf5f">cutlass::HostTensor::kElementsPerStoredItem</a></div><div class="ttdeci">static int const kElementsPerStoredItem</div><div class="ttdoc">Used to handle packing of subbyte elements. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:102</div></div>
<div class="ttc" id="tensor__view_8h_html"><div class="ttname"><a href="tensor__view_8h.html">tensor_view.h</a></div><div class="ttdoc">Defines a structure containing strides and a pointer to tensor data. </div></div>
<div class="ttc" id="device__memory_8h_html"><div class="ttname"><a href="device__memory_8h.html">device_memory.h</a></div><div class="ttdoc">C++ interface to CUDA device memory management functions. </div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a068d76dabce39c48b617ee7fe8d7edb8"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a068d76dabce39c48b617ee7fe8d7edb8">cutlass::HostTensor::~HostTensor</a></div><div class="ttdeci">~HostTensor()</div><div class="ttdef"><b>Definition:</b> host_tensor.h:149</div></div>
<div class="ttc" id="classcutlass_1_1TensorRef_html_ad3c5c9466713f62a5191e720827f34da"><div class="ttname"><a href="classcutlass_1_1TensorRef.html#ad3c5c9466713f62a5191e720827f34da">cutlass::TensorRef&lt; Element, Layout &gt;::ConstTensorRef</a></div><div class="ttdeci">TensorRef&lt; typename platform::remove_const&lt; Element &gt;::type const, Layout &gt; ConstTensorRef</div><div class="ttdoc">TensorRef to constant data. </div><div class="ttdef"><b>Definition:</b> tensor_ref.h:179</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a5686ea068c8f3e820ccff015e95bc474"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a5686ea068c8f3e820ccff015e95bc474">cutlass::HostTensor::copy_in_device_to_device</a></div><div class="ttdeci">void copy_in_device_to_device(Element const *ptr_device, LongIndex count=-1)</div><div class="ttdoc">Copy data from a caller-supplied device pointer into host memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:395</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a4c6d967596e266ceab3d36f6c8d05152"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a4c6d967596e266ceab3d36f6c8d05152">cutlass::HostTensor::ConstReference</a></div><div class="ttdeci">typename ConstTensorRef::Reference ConstReference</div><div class="ttdoc">Constant reference to element in tensor. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:99</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a4a16e522cac85735cfcb056dc928de18"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a4a16e522cac85735cfcb056dc928de18">cutlass::HostTensor::stride</a></div><div class="ttdeci">Index stride(int dim) const </div><div class="ttdoc">Returns the layout object&amp;#39;s stride in a given physical dimension. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:329</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_af339765c90429fe99b98a0da6a627421"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#af339765c90429fe99b98a0da6a627421">cutlass::HostTensor::sync_device</a></div><div class="ttdeci">void sync_device()</div><div class="ttdoc">Copies data from host to device. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:372</div></div>
<div class="ttc" id="classcutlass_1_1TensorView_html_a71def6d54ed28dfe3b17fde3e6461578"><div class="ttname"><a href="classcutlass_1_1TensorView.html#a71def6d54ed28dfe3b17fde3e6461578">cutlass::TensorView&lt; Element, Layout &gt;::ConstTensorView</a></div><div class="ttdeci">TensorView&lt; typename platform::remove_const&lt; Element &gt;::type const, Layout &gt; ConstTensorView</div><div class="ttdoc">TensorView pointing to constant memory. </div><div class="ttdef"><b>Definition:</b> tensor_view.h:95</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a78bc9c976c204822680075685cb8363e"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a78bc9c976c204822680075685cb8363e">cutlass::HostTensor::TensorView</a></div><div class="ttdeci">TensorView&lt; Element, Layout &gt; TensorView</div><div class="ttdoc">Tensor reference to device memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:90</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a252ce9281a40863f32be25d3b40d6373"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a252ce9281a40863f32be25d3b40d6373">cutlass::HostTensor::host_data_ptr_offset</a></div><div class="ttdeci">Element * host_data_ptr_offset(LongIndex ptr_element_offset)</div><div class="ttdoc">Gets pointer to host data with a pointer offset. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:242</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html"><div class="ttname"><a href="classcutlass_1_1HostTensor.html">cutlass::HostTensor</a></div><div class="ttdoc">Host tensor. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:59</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a075b666917a43c9bc168bfff6db27203"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a075b666917a43c9bc168bfff6db27203">cutlass::HostTensor::device_view</a></div><div class="ttdeci">TensorView device_view(LongIndex ptr_element_offset=0)</div><div class="ttdoc">Accesses the tensor reference pointing to data. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:293</div></div>
<div class="ttc" id="classcutlass_1_1TensorView_html"><div class="ttname"><a href="classcutlass_1_1TensorView.html">cutlass::TensorView&lt; Element, Layout &gt;</a></div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_ab3051d2842b3aa3815e2ea5f53abfc2a"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#ab3051d2842b3aa3815e2ea5f53abfc2a">cutlass::HostTensor::copy_out_device_to_host</a></div><div class="ttdeci">void copy_out_device_to_host(Element *ptr_host, LongIndex count=-1) const </div><div class="ttdoc">Copy data from a caller-supplied device pointer into host memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:440</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_abeefdb8bccb2d8d751fdb22fa7e8ef0c"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#abeefdb8bccb2d8d751fdb22fa7e8ef0c">cutlass::HostTensor::copy_out_host_to_device</a></div><div class="ttdeci">void copy_out_host_to_device(Element *ptr_device, LongIndex count=-1) const </div><div class="ttdoc">Copy data from a caller-supplied device pointer into host memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:470</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_ae261f1b7ef78cc52dcb77f1a2fd05b69"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#ae261f1b7ef78cc52dcb77f1a2fd05b69">cutlass::HostTensor::at</a></div><div class="ttdeci">ConstReference at(TensorCoord const &amp;coord) const </div><div class="ttdoc">Returns a const reference to the element at the logical Coord in host memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:349</div></div>
<div class="ttc" id="structcutlass_1_1sizeof__bits_html"><div class="ttname"><a href="structcutlass_1_1sizeof__bits.html">cutlass::sizeof_bits</a></div><div class="ttdoc">Defines the size of an element in bits. </div><div class="ttdef"><b>Definition:</b> numeric_types.h:42</div></div>
<div class="ttc" id="namespacecutlass_1_1device__memory_html_a0a3ab26e6c9a8aae6b09bfb3e4eb24e8"><div class="ttname"><a href="namespacecutlass_1_1device__memory.html#a0a3ab26e6c9a8aae6b09bfb3e4eb24e8">cutlass::device_memory::copy_host_to_host</a></div><div class="ttdeci">void copy_host_to_host(T *dst, T const *src, size_t count=1)</div><div class="ttdef"><b>Definition:</b> device_memory.h:96</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a3c5b60678dfa105b10c87dfaab4cf395"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a3c5b60678dfa105b10c87dfaab4cf395">cutlass::HostTensor::host_ref</a></div><div class="ttdeci">ConstTensorRef host_ref(LongIndex ptr_element_offset=0) const </div><div class="ttdoc">Accesses the tensor reference pointing to data. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:270</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_af1264450c122c1853231fc64b35a47b8"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#af1264450c122c1853231fc64b35a47b8">cutlass::HostTensor::extent</a></div><div class="ttdeci">TensorCoord extent() const </div><div class="ttdoc">Returns the extent of the tensor. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:354</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a7d34307e09d4ea09d68abbf31fe33788"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a7d34307e09d4ea09d68abbf31fe33788">cutlass::HostTensor::host_data</a></div><div class="ttdeci">Element * host_data()</div><div class="ttdoc">Gets pointer to host data. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:239</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a6405f217fc2a52f8e23180c9f8160899"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a6405f217fc2a52f8e23180c9f8160899">cutlass::HostTensor::reserve</a></div><div class="ttdeci">void reserve(size_t count, bool device_backed_=true)</div><div class="ttdoc">Resizes internal memory allocations without affecting layout or extent. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:161</div></div>
<div class="ttc" id="structcutlass_1_1ReferenceFactory_html"><div class="ttname"><a href="structcutlass_1_1ReferenceFactory.html">cutlass::ReferenceFactory</a></div><div class="ttdef"><b>Definition:</b> subbyte_reference.h:557</div></div>
<div class="ttc" id="classcutlass_1_1TensorRef_html"><div class="ttname"><a href="classcutlass_1_1TensorRef.html">cutlass::TensorRef&lt; Element, Layout &gt;</a></div></div>
<div class="ttc" id="platform_8h_html_a39e234a3e3b0018b58df720bcb143420"><div class="ttname"><a href="platform_8h.html#a39e234a3e3b0018b58df720bcb143420">__NV_STD_MIN</a></div><div class="ttdeci">#define __NV_STD_MIN(a, b)</div><div class="ttdoc">Select minimum(a, b) </div><div class="ttdef"><b>Definition:</b> platform.h:168</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a73430856f79bedb64f9cf6b2044f38e3"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a73430856f79bedb64f9cf6b2044f38e3">cutlass::HostTensor::device_backed</a></div><div class="ttdeci">bool device_backed() const </div><div class="ttdoc">Returns true if device memory is allocated. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:303</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_ab777a9a19d9354b4011eef09d0105900"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#ab777a9a19d9354b4011eef09d0105900">cutlass::HostTensor::TensorCoord</a></div><div class="ttdeci">typename Layout::TensorCoord TensorCoord</div><div class="ttdoc">Coordinate in logical tensor space. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:78</div></div>
<div class="ttc" id="classcutlass_1_1TensorRef_html_a0aba29ebf8715d217817a49356f95d3f"><div class="ttname"><a href="classcutlass_1_1TensorRef.html#a0aba29ebf8715d217817a49356f95d3f">cutlass::TensorRef&lt; Element, Layout &gt;::Reference</a></div><div class="ttdeci">typename platform::conditional&lt; sizeof_bits&lt; Element &gt;::value &gt;=8, Element &amp;, SubbyteReference&lt; Element &gt; &gt;::type Reference</div><div class="ttdoc">Reference type to an element. </div><div class="ttdef"><b>Definition:</b> tensor_ref.h:159</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_adafe2bee53260d47bc60479c50953f57"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#adafe2bee53260d47bc60479c50953f57">cutlass::HostTensor::host_data</a></div><div class="ttdeci">Reference host_data(LongIndex idx)</div><div class="ttdoc">Gets a reference to an element in host memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:245</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a8a947176a4ddab5b784c98a0f1896892"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a8a947176a4ddab5b784c98a0f1896892">cutlass::HostTensor::extent</a></div><div class="ttdeci">TensorCoord &amp; extent()</div><div class="ttdoc">Returns the extent of the tensor. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:359</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_af50ce8b091c106ac88b75e15ab028868"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#af50ce8b091c106ac88b75e15ab028868">cutlass::HostTensor::HostTensor</a></div><div class="ttdeci">HostTensor()</div><div class="ttdoc">Default constructor. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:128</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_ac4445444c8f092dd1be47f1530affbaf"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#ac4445444c8f092dd1be47f1530affbaf">cutlass::HostTensor::ConstTensorView</a></div><div class="ttdeci">typename TensorView::ConstTensorView ConstTensorView</div><div class="ttdoc">Tensor reference to constant device memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:93</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a784d0b84de512c1bff131710226e2338"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a784d0b84de512c1bff131710226e2338">cutlass::HostTensor::resize</a></div><div class="ttdeci">void resize(TensorCoord const &amp;extent, bool device_backed_=true)</div><div class="ttdef"><b>Definition:</b> host_tensor.h:221</div></div>
<div class="ttc" id="namespacecutlass_1_1device__memory_html_a5333f291105136d2e8e4c31329d93c31"><div class="ttname"><a href="namespacecutlass_1_1device__memory.html#a5333f291105136d2e8e4c31329d93c31">cutlass::device_memory::copy_to_host</a></div><div class="ttdeci">void copy_to_host(T *dst, T const *src, size_t count=1)</div><div class="ttdef"><b>Definition:</b> device_memory.h:86</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a2b4858efb0356a6fc01bb9f55f0ad3b2"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a2b4858efb0356a6fc01bb9f55f0ad3b2">cutlass::HostTensor::copy_in_device_to_host</a></div><div class="ttdeci">void copy_in_device_to_host(Element const *ptr_device, LongIndex count=-1)</div><div class="ttdoc">Copy data from a caller-supplied device pointer into host memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:380</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_ac3e08629bab5304f999fb5115453a714"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#ac3e08629bab5304f999fb5115453a714">cutlass::HostTensor::offset</a></div><div class="ttdeci">LongIndex offset(TensorCoord const &amp;coord) const </div><div class="ttdoc">Computes the offset of an index from the origin of the tensor. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:339</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a75ce60d02c9d8fdcbcaceecc6b3ec7fa"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a75ce60d02c9d8fdcbcaceecc6b3ec7fa">cutlass::HostTensor::host_view</a></div><div class="ttdeci">TensorView host_view(LongIndex ptr_element_offset=0)</div><div class="ttdoc">Accesses the tensor reference pointing to data. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:283</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_abf381d496b50aad3df4bb72e3d891bac"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#abf381d496b50aad3df4bb72e3d891bac">cutlass::HostTensor::HostTensor</a></div><div class="ttdeci">HostTensor(TensorCoord const &amp;extent, bool device_backed=true)</div><div class="ttdoc">Constructs a tensor given an extent. Assumes a packed layout. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:131</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a55a73e5ff7c7404c0bdee5f2b578b876"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a55a73e5ff7c7404c0bdee5f2b578b876">cutlass::HostTensor::device_ref</a></div><div class="ttdeci">TensorRef device_ref(LongIndex ptr_element_offset=0)</div><div class="ttdoc">Accesses the tensor reference pointing to data. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:273</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a99748a0d7625419be1bf1b5edea8960f"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a99748a0d7625419be1bf1b5edea8960f">cutlass::HostTensor::Element</a></div><div class="ttdeci">Element_ Element</div><div class="ttdoc">Data type of individual access. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:63</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_ab1253b57fd95f16b2dec9e36e84051d4"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#ab1253b57fd95f16b2dec9e36e84051d4">cutlass::HostTensor::at</a></div><div class="ttdeci">Reference at(TensorCoord const &amp;coord)</div><div class="ttdoc">Returns a reference to the element at the logical Coord in host memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:344</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_ab91b456881d5f9c0f52a4bc89d448d55"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#ab91b456881d5f9c0f52a4bc89d448d55">cutlass::HostTensor::reset</a></div><div class="ttdeci">void reset(TensorCoord const &amp;extent, bool device_backed_=true)</div><div class="ttdef"><b>Definition:</b> host_tensor.h:195</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_ae76a55dd7f4d827f042f9c9018567271"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#ae76a55dd7f4d827f042f9c9018567271">cutlass::HostTensor::ConstTensorRef</a></div><div class="ttdeci">typename TensorRef::ConstTensorRef ConstTensorRef</div><div class="ttdoc">Tensor reference to constant device memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:87</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a7741d51bf7d241d4821e52e47b704c69"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a7741d51bf7d241d4821e52e47b704c69">cutlass::HostTensor::host_data</a></div><div class="ttdeci">ConstReference host_data(LongIndex idx) const </div><div class="ttdoc">Gets a constant reference to an element in host memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:253</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a898fc427538275635a55e7633cd89140"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a898fc427538275635a55e7633cd89140">cutlass::HostTensor::reset</a></div><div class="ttdeci">void reset()</div><div class="ttdoc">Clears the HostTensor allocation to size/capacity = 0. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:152</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_aa3458af41bf057e8bcfd895388a52659"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#aa3458af41bf057e8bcfd895388a52659">cutlass::HostTensor::kRank</a></div><div class="ttdeci">static int const kRank</div><div class="ttdoc">Logical rank of tensor index space. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:69</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a81043b0539c8d18c40957411dd149e28"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a81043b0539c8d18c40957411dd149e28">cutlass::HostTensor::device_data_ptr_offset</a></div><div class="ttdeci">Element * device_data_ptr_offset(LongIndex ptr_element_offset)</div><div class="ttdoc">Gets pointer to device data with a pointer offset. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:261</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_aacf36383bd4608f6d30c561ce4851b83"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#aacf36383bd4608f6d30c561ce4851b83">cutlass::HostTensor::size</a></div><div class="ttdeci">size_t size() const </div><div class="ttdoc">Returns the number of elements stored in the host tensor. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:229</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a4bf91f711ef17492809c09d53364cb35"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a4bf91f711ef17492809c09d53364cb35">cutlass::HostTensor::device_ref</a></div><div class="ttdeci">ConstTensorRef device_ref(LongIndex ptr_element_offset=0) const </div><div class="ttdoc">Accesses the tensor reference pointing to data. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:278</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a9b78ff4fb7f317809b8cb8f70c557bea"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a9b78ff4fb7f317809b8cb8f70c557bea">cutlass::HostTensor::layout</a></div><div class="ttdeci">Layout &amp; layout()</div><div class="ttdoc">Returns the layout object. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:309</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a33698c7aa33255e7a2e7abc298e28f39"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a33698c7aa33255e7a2e7abc298e28f39">cutlass::HostTensor::Reference</a></div><div class="ttdeci">typename TensorRef::Reference Reference</div><div class="ttdoc">Reference to element in tensor. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:96</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_ac61cee5b25585439f4ccc7d7249ee853"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#ac61cee5b25585439f4ccc7d7249ee853">cutlass::HostTensor::resize</a></div><div class="ttdeci">void resize(TensorCoord const &amp;extent, Layout const &amp;layout, bool device_backed_=true)</div><div class="ttdef"><b>Definition:</b> host_tensor.h:204</div></div>
<div class="ttc" id="matrix__traits_8h_html"><div class="ttname"><a href="matrix__traits_8h.html">matrix_traits.h</a></div><div class="ttdoc">Defines properties of matrices used to denote layout and operands to GEMM kernels. </div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_add43f2f758df7f5e6e028c3cba0cf277"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#add43f2f758df7f5e6e028c3cba0cf277">cutlass::HostTensor::TensorRef</a></div><div class="ttdeci">TensorRef&lt; Element, Layout &gt; TensorRef</div><div class="ttdoc">Tensor reference to device memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:84</div></div>
<div class="ttc" id="structcutlass_1_1device__memory_1_1allocation_html"><div class="ttname"><a href="structcutlass_1_1device__memory_1_1allocation.html">cutlass::device_memory::allocation&lt; Element &gt;</a></div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a4f23ad5953f9cd5dff8e97d9edbc0cf0"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a4f23ad5953f9cd5dff8e97d9edbc0cf0">cutlass::HostTensor::reset</a></div><div class="ttdeci">void reset(TensorCoord const &amp;extent, Layout const &amp;layout, bool device_backed_=true)</div><div class="ttdef"><b>Definition:</b> host_tensor.h:182</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a23976f8c123de032cf4a2632a894fcf2"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a23976f8c123de032cf4a2632a894fcf2">cutlass::HostTensor::stride</a></div><div class="ttdeci">Stride stride() const </div><div class="ttdoc">Returns the layout object&amp;#39;s stride vector. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:319</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a33679b84f59829c70457b9ff438101bf"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a33679b84f59829c70457b9ff438101bf">cutlass::HostTensor::Index</a></div><div class="ttdeci">typename Layout::Index Index</div><div class="ttdoc">Index type. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:72</div></div>
<div class="ttc" id="cutlass_8h_html"><div class="ttname"><a href="cutlass_8h.html">cutlass.h</a></div><div class="ttdoc">Basic include for CUTLASS. </div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_ac921be812016052c690d2dc808d415f1"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#ac921be812016052c690d2dc808d415f1">cutlass::HostTensor::host_ref</a></div><div class="ttdeci">TensorRef host_ref(LongIndex ptr_element_offset=0)</div><div class="ttdoc">Accesses the tensor reference pointing to data. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:267</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_ab7179440d39b0445113b30b7a460a1ec"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#ab7179440d39b0445113b30b7a460a1ec">cutlass::HostTensor::copy_out_device_to_device</a></div><div class="ttdeci">void copy_out_device_to_device(Element *ptr_device, LongIndex count=-1) const </div><div class="ttdoc">Copy data from a caller-supplied device pointer into host memory. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:455</div></div>
<div class="ttc" id="namespacecutlass_1_1device__memory_html_a8ff6151b081442db9af7421110c0242b"><div class="ttname"><a href="namespacecutlass_1_1device__memory.html#a8ff6151b081442db9af7421110c0242b">cutlass::device_memory::copy_device_to_device</a></div><div class="ttdeci">void copy_device_to_device(T *dst, T const *src, size_t count=1)</div><div class="ttdef"><b>Definition:</b> device_memory.h:91</div></div>
<div class="ttc" id="classcutlass_1_1HostTensor_html_a3dd62ca461666b3ac7e690e2befecaae"><div class="ttname"><a href="classcutlass_1_1HostTensor.html#a3dd62ca461666b3ac7e690e2befecaae">cutlass::HostTensor::host_data</a></div><div class="ttdeci">Element const * host_data() const </div><div class="ttdoc">Gets pointer to host data. </div><div class="ttdef"><b>Definition:</b> host_tensor.h:250</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
